/*
 * @Author: wuchao66_Git 2803670835@qq.com
 * @Date: 2023-11-10 10:37:39
 * @LastEditors: wuchao66_Git 2803670835@qq.com
 * @LastEditTime: 2023-11-17 11:22:13
 * @FilePath: \t161xgvue\src\api\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '../utils/request'
import r1 from '../utils/request-excel'
export function findUserList(currentPage,pageSize,userVO){
    return request({
        //http://localhost:8888/user/findUserList
        url: '/user/findUserList',
        method: 'post',
        params:{
            currentPage,pageSize
        },
        data:userVO
    });
}

export function exportUserExcel(userVO){
    return r1({
        url: 'user/export',
        method: 'post',
        data:userVO,
        //前台接了一个大数据的二进制流回来了blob
        responseType: "blob"
    });
}

//删除头像的方法 deleteImgFile
export function deleteImgFile(file) {
    return r1({
      url: "deleteImgFile",
      method: "post",
      params: {
        file,
      },
    });
  }

 export function login(username,password) {//和接口中一样为tree没有入参
   return request({
     url: '/user/login',
     method: 'post',
     params:{
        username,
        password,
     }
   })
 }